package com.hnucm.ktstudy.base
//数组 转换操作符as
fun main() {
    //创建一个空间为5的Int数组
    val arr = arrayOf(1,2,3,4,5)
    val arr1 = intArrayOf(1,2,3,4,5)
    var arr2 = IntArray(5)
    arr2[0]=1
    println(arr[1])

    //创建一个空间为2的字符串数组
    var str = Array(5){""}
    str[0]="牛"

    var dob = Array(5){1.0}
    println(dob[0])

    var y:Int?=null
    y=null

    val x: String? = y
    val x1:String? = y as? String
}